<?php
/**
 * View all works and can edit & delete & check & rate
 */
class Index extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->library('session');
        $this->load->helper('url');

        if (!($this->session->userdata['login'])) {
            redirect('poster_admin/login');
        }

        if (file_exists('application/controllers/install.php'))
            redirect('install');

    }

    function index() {
        $data['title'] = '管理后台';
        $this->load->view('templates/poster_admin/header', $data);
        $this->load->view('poster_admin/index', $data);
        $this->load->view('templates/poster_admin/footer', $data);
    }

}